import {lazy, Suspense} from 'react'

export const lazyComponent = (importComp: () => any) => {
  const Comp = lazy(importComp);
  return (
    <Suspense fallback={<div>loading...</div>}>
      <Comp />
    </Suspense>
  );
};

